package cn.sendto.rowmapper.impl;

import java.sql.ResultSet;
import java.sql.SQLException;

import cn.sendto.model.CarInfoModel;
import cn.sendto.rowmapper.IRowMapper;

public class CarInfoMapper implements IRowMapper<CarInfoModel>{

	@Override
	public CarInfoModel rowMapper(ResultSet rs) throws SQLException {
		CarInfoModel cim = new CarInfoModel();
		cim.setCarId(rs.getInt("carid"));
		cim.setCarNum(rs.getString("carnum"));
		cim.setCarType(rs.getString("cartype"));
		cim.setColor(rs.getString("color"));
		cim.setDriveNum(rs.getString("drivenum"));
		cim.setParkId(rs.getInt("parkid"));
		cim.setResidentId(rs.getInt("residentid"));
		return cim;
	}

}
